package com.aaa.day03.mystatic;

import java.util.Date;

/**
 * @author ：Teacher陈（86521760@qq.com）
 * @date ：Created in 2024/11/13 9:22
 * @description：
 * @modified By：
 * @version:
 */
public class MyStaticTest {
    public    int  id=2;
    public  String name;

    public MyStaticTest(int id, String name) {
       // this.id = id;

        this.name = name;
    }

    public void aaa(){
        this.id=344;
    }
    public MyStaticTest() {
        System.out.println("构造方法执行了");
    }

    {
        System.out.println("代码块执行了");
        System.out.println(new Date());
    }
    static {
        System.out.println("静态代码块执行了");
    }

    public static void main(String[] args) {
        MyStaticTest myStaticTest1=  new MyStaticTest();
        MyStaticTest myStaticTest2=  new MyStaticTest();
        MyStaticTest myStaticTest3=  new MyStaticTest();
    }
}
